Skip to content

feat(output): carry loop-closing commands in seam agent packets (#2630, #2669) - #2866

Merged
EffortlessSteven merged 6 commits into
mainfrom
feat/seam-packet-loop-commands-2630-2669
Aug 4, 2026
Merged

EffortlessSteven merged 6 commits into
mainfrom
feat/seam-packet-loop-commands-2630-2669

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Aug 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Status: draft; implementation and documentation are updated, but the hosted
golden/fixture proof must complete before merge.

This PR carries the repair loop into seam-agent packets for #2630 and #2669:
actionable packets include an advisory suggested test filter and a shared
snapshot/verify/receipt handoff. The receipt is emitted only for a single
actionable envelope; mixed and multi-seam envelopes remain unscoped.

Swarm / Source Boundary

This is ordinary same-repo ripr-swarm analyzer/output and documentation work.
It does not touch crates.io, editor marketplace, release assets, signing, or
release secrets.

Source-of-truth Links

Spec: docs/specs/RIPR-SPEC-0010-agent-working-set-brief.md
Issue: #2630, #2669
Active goal: #2829
Release disposition: hold_post_release; do not include in the 0.11 candidate.

Scope

  • Add the repair-loop projection to agent-seam-packets-json.
  • Keep schema version 0.3; the additions are compatible additive fields under
    the repository's existing packet contract.
  • Prevent seam receipt attribution for mixed or multi-seam envelopes.
  • Create workflow/report directories before the first redirected snapshot.
  • Document the emitted packet fields, brief projection, and honesty boundary.
  • Update traceability and the affected golden fixture.

Scope Classification

This PR is scoped by:

  • One public output contract
  • One evidence package
  • Architectural seam

Production delta:

  • crates/ripr/src/output/agent_seam_packets.rs
  • crates/ripr/src/agent/loop_commands.rs

Evidence/support delta:

  • docs/OUTPUT_SCHEMA.md
  • docs/specs/RIPR-SPEC-0010-agent-working-set-brief.md
  • .ripr/traceability.toml
  • fixtures/boundary_gap/expected/editor-agent-loop/agent-packet.json

Single acceptance criterion: the candidate-produced packet JSON, golden
fixture, schema documentation, and focused tests agree on the repair-loop
contract.

Non-goals:

  • No classification or evidence changes.
  • No test execution from suggested_test_command.
  • No change to ripr agent verify execution semantics.
  • No release-candidate inclusion decision.

Support-tier Impact

  • changes a JSON/output contract and its documentation

Claim/proof notes: the suggested command is advisory and is explicitly marked
runnable_after_the_suggested_test_exists; it is not a test receipt.

Policy Impact

  • doc artifacts
  • generated artifact
  • CI lane

No new exception, dependency, process, or network surface is introduced.

Proof

cargo fmt --all -- --check
git diff --check
cargo test -p ripr agent_seam_packets
cargo xtask goldens check
cargo xtask check-no-panic-family
cargo xtask check-static-language
cargo xtask check-allow-attributes

Results:

  • Formatting and diff hygiene: pass on b552feb1f.
  • Local Rust execution after the repair: not run; Windows linker file-lock
    errors (LNK1104) prevented a trustworthy local binary.
  • Prior exact-head hosted run: real fixture mismatch, not infrastructure; it
    identified the expected packet golden as stale.
  • Current hosted run on b552feb1f: in progress; it must provide the
    candidate-produced golden/fixture result.

Claim Boundary

After merge this proves the output contract and its fixture/test alignment. It
does not prove runtime test adequacy, mutation confirmation, merge approval for
downstream consumers, or release inclusion.

Rollback

Revert the squash merge. This removes the additive packet fields, loop-command
projection, documentation, traceability entry, and golden update together.

Spec-Test-Code Traceability

  • Spec: RIPR-SPEC-0010
  • Tests: focused agent_seam_packets tests, including mixed-envelope receipt
    nullability
  • Code: agent_seam_packets.rs, shared loop_commands.rs
  • Golden: fixtures/boundary_gap/expected/editor-agent-loop/agent-packet.json
  • Metrics: existing agent packet metrics; no new metric

Static Language Check

  • Static output avoids unsupported runtime claims.
  • Unknowns retain explicit boundaries.

CI Economics

  • LEM impact: existing Rust test/coverage lanes only; no workflow change.
  • Failure mode caught: output-contract/golden drift and receipt misattribution.
  • Cheaper signal considered: focused unit tests and golden check; hosted
    fixture proof remains required because the local golden gate previously missed
    this drift.
  • Required lanes affected: routed Rust fixture/test lane.
  • Advisory lanes: coverage and automated review remain advisory or remote-owned
    until terminal.
  • Rollback path: revert the merged PR.

Engineering Check

  • No new panic-family production/test surface.
  • No new non-Rust programming file.
  • Public JSON/schema changes are documented.

Gates

  • cargo fmt --all -- --check
  • git diff --check
  • hosted required Rust fixture/test route on exact head
  • substantive current-head review after the repair
  • cargo xtask goldens check on exact candidate environment

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Aug 1, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@EffortlessSteven, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 11 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 54947a17-78b8-48e9-8ad7-4dfc7b0e02f1

📥 Commits

Reviewing files that changed from the base of the PR and between af1f52d and c61121b.

📒 Files selected for processing (5)
  • .ripr/traceability.toml
  • crates/ripr/src/output/agent_seam_packets.rs
  • docs/OUTPUT_SCHEMA.md
  • docs/specs/RIPR-SPEC-0010-agent-working-set-brief.md
  • fixtures/boundary_gap/expected/editor-agent-loop/agent-packet.json

Summary by CodeRabbit

  • New Features

    • Added actionable workflow instructions to targeted test packets, including snapshot, verification, and receipt steps.
    • Added advisory suggested test commands with clear readiness status.
    • Added distinct handling for single-seam, multi-seam, static-limitation, and empty packets.
  • Documentation

    • Updated the output schema and working-set guidance to explain suggested commands and handoff workflows.

Walkthrough

Agent seam packets now provide conditional suggested-test metadata and repair-loop handoff commands. The renderer handles single-seam, multi-seam, static-limitation, and empty envelopes. Tests, traceability entries, and documentation cover the new output.

Changes

Agent seam packet handoff

Layer / File(s) Summary
Packet rendering and command composition
crates/ripr/src/output/agent_seam_packets.rs
Targeted-test packets now include suggested-test metadata. Actionable envelopes include snapshot, verification, and conditional receipt commands.
Rendering coverage and traceability
crates/ripr/src/output/agent_seam_packets.rs, .ripr/traceability.toml
Tests and traceability entries cover single-seam, multi-seam, static-only, and empty envelope behavior.
Schema and specification updates
docs/OUTPUT_SCHEMA.md, docs/specs/RIPR-SPEC-0010-agent-working-set-brief.md
Documentation describes suggested-test fields and the optional, advisory next command bundle.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant AgentSeamPacketRenderer
  participant loop_commands
  participant AgentSeamPacketEnvelope
  AgentSeamPacketRenderer->>loop_commands: build snapshot, verification, and receipt commands
  loop_commands-->>AgentSeamPacketRenderer: return shared command strings
  AgentSeamPacketRenderer->>AgentSeamPacketEnvelope: render suggested test metadata and next bundle
Loading

Possibly related PRs

Suggested labels: enhancement

Poem

A rabbit packs commands in a seam-sized tray,
Snapshot at dusk, verify by day.
One seam gets a receipt tied neat,
Many seams leave that field complete.
“Test when it exists,” the rabbit says.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the main change: adding loop-closing commands to seam agent packets.
Description check ✅ Passed The description covers the required scope, boundaries, proof status, traceability, rollback, and engineering sections.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/seam-packet-loop-commands-2630-2669

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Release disposition under #2766: hold_post_release. Keep this PR draft; its draft output-schema work conflicts with the selected #2657/#2658 packet migration and cannot merge before that contract is complete and re-decided.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

CI failure diagnosis (2026-08-02)

The Required Rust gates step fails in cli_smoke.rs:

test editor_agent_loop_fixture_outputs_match_expected ... FAILED
test result: FAILED. 170 passed; 1 failed

This is a golden fixture mismatch — the PR adds verify/receipt commands to seam agent packets (#2630/#2669), which changes the expected output of editor_agent_loop fixtures. The fixture expected output needs to be re-blessed to include the new commands.

Run cargo xtask goldens bless editor_agent_loop --reason "add verify/receipt commands to seam packets (#2866)" to update the expected output.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/ripr/src/output/agent_seam_packets.rs`:
- Around line 173-180: Finalize the output contract for the new next and
suggested_test_command fields in the repair-loop JSON emitted by
push_repair_loop_json and its surrounding output path. Resolve whether schema
version 0.3 remains valid or must be incremented, update the corresponding
schema definition, then re-bless all affected golden fixtures, including
editor_agent_loop_fixture_outputs_match_expected, against current main.
- Around line 207-218: Update the receipt construction in the
actionable-envelope flow to require actionable.len() == 1 before emitting
receipt_after_verify, rather than counting only write-targeted-test packets.
Preserve the existing single targeted-test receipt contents, keep the field null
for any multi-packet envelope, and add coverage for an envelope containing
targeted-test and inspect_static_limitation packets.

In `@docs/OUTPUT_SCHEMA.md`:
- Around line 12715-12721: Re-bless the affected golden fixture for
editor_agent_loop_fixture_outputs_match_expected against the current main branch
so it includes the new repair-loop commands, then verify the generated artifact
directly and update the documented output contract to match the re-blessed
result.
- Around line 12909-12916: The shared-handoff documentation uses packet field
names that do not match the working-set brief schema. Update
docs/OUTPUT_SCHEMA.md lines 12909-12916 and
docs/specs/RIPR-SPEC-0010-agent-working-set-brief.md lines 49-55 to consistently
describe next.inspect_packet, verification.before_snapshot_command,
verification.after_snapshot_command, verification.verify_command, and
next.write_receipt; alternatively, explicitly document the transformation
between these brief fields and the packet next contract.
- Around line 12717-12720: Update the documented workflow commands around
before_snapshot_command to create target/ripr/workflow and target/ripr/reports
before any shell redirection occurs. Ensure the preparatory step runs before the
snapshot commands, so both verify output and receipt output destinations already
exist.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d2b88107-6add-4cc8-8c25-66fa720f9312

📥 Commits

Reviewing files that changed from the base of the PR and between 5c8ad0e and af1f52d.

📒 Files selected for processing (4)
  • .ripr/traceability.toml
  • crates/ripr/src/output/agent_seam_packets.rs
  • docs/OUTPUT_SCHEMA.md
  • docs/specs/RIPR-SPEC-0010-agent-working-set-brief.md

Comment thread docs/OUTPUT_SCHEMA.md Resolved
Comment thread docs/OUTPUT_SCHEMA.md Resolved
Comment thread docs/OUTPUT_SCHEMA.md Resolved
@EffortlessSteven

Copy link
Copy Markdown
Member Author

Review repairs at 54641be1066f2923743b5dc66fe7a52c81979106

Addressed the actionable review findings:

  • Receipt attribution now requires actionable.len() == 1; a mixed envelope containing one targeted-test packet and one static-limitation packet leaves receipt_after_verify null. Added a focused regression test and traceability entry.
  • The first snapshot command now runs mkdir -p target/ripr/workflow target/ripr/reports before shell redirection, so a fresh checkout can create both destinations before writing artifacts.
  • Kept packet schema 0.3: these are additive fields under the repository's existing compatibility rule. docs/OUTPUT_SCHEMA.md and RIPR-SPEC-0010 now document the exact emitted top-level next names and the brief-to-packet projection.
  • Updated the expected packet golden from the exact candidate-produced JSON in the prior hosted JUnit failure, with the new directory-preparation command included. The artifact parses locally; the fresh hosted fixture run is the acceptance discriminator because local linking is unavailable on this Windows host.

The PR remains draft and hold_post_release until the new exact-head hosted test/coverage/review results are terminal. No release-candidate inclusion is claimed.

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintainer inspection — exact head 54641be1066f2923743b5dc66fe7a52c81979106

Inspected:

  • agent_seam_packets.rs receipt selection, mixed/static/multi/empty packet paths, and focused tests;
  • shared loop-command reuse and artifact path ordering;
  • OUTPUT_SCHEMA.md and RIPR-SPEC-0010 field names and projection wording;
  • traceability registration;
  • candidate packet golden parsed as JSON and checked for the exact emitted next and suggested-test fields.

Findings addressed in the current candidate:

  • seam receipts are now limited to exactly one actionable packet;
  • first snapshot preparation creates both redirected-output directories;
  • schema remains 0.3 under the repository's additive-field rule;
  • suggested test remains advisory and explicitly not evidence that the test exists or ran.

No additional actionable finding in this inspection. Local Rust execution is unavailable after bounded attempts because of Windows linker file-lock errors; hosted exact-head fixture/test proof remains required.

@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.57820% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/ripr/src/output/agent_seam_packets.rs 98.57% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Hosted compile repair at c61121b39

The exact-head routed run for 54641be10 reached the hosted Rust gates and failed on a real strict-Clippy error: xtask includes loop_commands.rs independently, so the new packet-only WORKFLOW_PREPARE_COMMAND constant was unused in that binary. This was a source defect, not infrastructure.

Repair: moved the preparation constant into agent_seam_packets.rs, where it is consumed, and left the shared loop-command module unchanged for the independent xtask include. cargo fmt --all -- --check and git diff --check pass locally. The exact-head hosted route is being rerun; no merge or acceptance claim is made until it reaches a terminal result.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review August 4, 2026 03:56
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@EffortlessSteven
EffortlessSteven merged commit 8fe2bc3 into main Aug 4, 2026
29 checks passed
@EffortlessSteven
EffortlessSteven deleted the feat/seam-packet-loop-commands-2630-2669 branch August 4, 2026 03:56

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c61121b397

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

/// workspace path of its own, and the receipt command already projected
/// through `evidence_record` uses the same `--root .`, so the whole
/// envelope stays consistent for an agent running from the workspace root.
const REPAIR_LOOP_ROOT: &str = ".";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve the analyzed workspace root in loop commands

Failure mode: when ripr agent packet --root fixtures/boundary_gap/input --seam-id 67fc764ba37d77bd --json is invoked from the repository root—or whenever --root differs from the current directory—the new next commands hard-code --root . and relative artifact paths, so copying them snapshots and verifies the caller's current workspace rather than the workspace that produced the packet, potentially issuing a receipt for unrelated evidence. Fix direction: thread the analyzed root into this renderer and emit commands whose root, working directory, and redirected artifacts consistently refer to it; validate with a CLI regression that invokes agent packet from outside the requested root and executes the generated loop. This repository explicitly requires emitted commands to enforce the contract they claim. Confidence: High; the command above reproduces the packet with --root . despite the requested fixture root.

AGENTS.md reference: AGENTS.md:L262-L272

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant